<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.infodms.dms.common.Constant"%>

<%
	String contextPath = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="${contextPath}/common/jsp_head_new.jsp" />
<script type="text/javascript">
	function doInit(){
		loadcalendar();   //初始化时间控件
	}
	function txtClr(valueId) {
		document.getElementById(valueId).value = '' ;
	}
</script>
<title>批发查询</title>
</head>
<body onunload='javascript:destoryPrototype();' > 
<div class="wbox">
	<div class="navigation"><img src="<%=contextPath%>/img/nav.gif" />&nbsp;当前位置：  整车销售 &gt; 经销商库存管理 &gt; 车辆批发查询</div>
	<form id="fm" name="fm" method="post">
		<input type="hidden" name="curPage" id="curPage" value="1" />
		<input type="hidden" id="dlrId" name="dlrId" value="" />
		<table class="table_query" border="0">
			<tr>
				<td class="tblopt">
				<div align="right">批发申请日期：</div>
				</td>
				<td>
					<div align="left">
	            		<input name="startDate" id="t1" value="" type="text" class="short_txt" datatype="1,is_date,10" group="t1,t2" hasbtn="true" callFunction="showcalendar(event, 't1', false);" />
	            		&nbsp;至&nbsp;
	            		<input name="endDate" id="t2" value="" type="text" class="short_txt" datatype="1,is_date,10" group="t1,t2" hasbtn="true" callFunction="showcalendar(event, 't2', false);" />
            		</div>	
				</td>
				<td></td>
			</tr>
			<tr>
				<td width="20%" class="tblopt"><div align="right">物料组选择：</div></td>
				<td>
					<input type="text" name="materialCode" size="10" value="" class="middle_txt"/>
       				<input type="button" value="..." class="mini_btn"  onclick="showMaterialGroup('materialCode','','true','');" />
       				<input type="button" class="normal_btn" onclick="txtClr('materialCode');" value="清 空" id="clrBtn" /> 
				</td>
			</tr>
			<tr>
				<td width="20%" class="tblopt"><div align="right">调出经销商：</div></td>
				<td width="39%" >
      				<input name="outDealerCode" type="text" id="outDealerCode" class="middle_txt" value="" size="20"  />
                    <input name="dlbtn" type="button" class="mini_btn" onclick="showOrgDealer('outDealerCode','','false', '', 'true');" value="..." />
                    <input type="button" class="normal_btn" onclick="txtClr('outDealerCode');" value="清 空" id="clrBtn" /> 
    			</td>
			</tr>
			<tr>
				<td width="20%" class="tblopt"><div align="right">调入经销商：</div></td>
				<td width="39%" >
      				<input name="inDealerCode" type="text" id="inDealerCode" class="middle_txt" value="" size="20"  />
                    <input name="dlbtn" type="button" class="mini_btn" onclick="showOrgDealer('inDealerCode','','false', '', 'true');" value="..." />
                    <input type="button" class="normal_btn" onclick="txtClr('inDealerCode');" value="清 空" id="clrBtn" />
    			</td>
    			<td class="table_query_3Col_input" >
					<input type="button" class="normal_btn" onclick="__extQuery__(1);" value=" 查  询  " id="queryBtn" /> 
				</td>
			</tr>
		</table>
	<jsp:include page="${contextPath}/queryPage/orderHidden.html" />
	</form>
	<jsp:include page="${contextPath}/queryPage/pageDiv.html" />
</div>
<script type="text/javascript">
	var myPage;
	var url = "<%=contextPath%>/sales/storageManage/VehicleDispatchQuery/vehicleDispatchQueryOEM.json?COMMAND=1";
	var title = null;
	
	var columns = [
				{header: "批发号", dataIndex: 'TRANSFER_NO', align:'center'},
				{header: "调出经销商", dataIndex: 'OUT_DEALER', align:'center'},
				{header: "调入经销商", dataIndex: 'IN_DEALER', align:'center'},
				{header: "VIN", dataIndex: 'VIN',renderer:mySelect, align:'center'},
				{header: "物料名称", dataIndex: 'MATERIAL_NAME', align:'center'},
				{header: "申请日期", dataIndex: 'APP_DATE', align:'center'},
				{header: "批发原因", dataIndex: 'TRANSFER_REASON', align:'center'},
				{header: "审批结果", dataIndex: 'CHECK_RES', align:'center',renderer:getItemValue},
				{header: "审批意见", dataIndex: 'CHECK_DESC', align:'center'}
		      ];
	function mySelect(value,meta,record){
	  	return String.format("<a href=\"#\" onclick='vehicleInfo(\""+value+"\")';>"+value+"</a>");
	}
	function vehicleInfo(value){
		OpenHtmlWindow('<%=contextPath%>/sales/storageManage/VehicleInfo/vehicleInfoQuery.do?vin='+value,700,500);
	}
		      
</script>    
</body>
</html>